<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>消息管理</title>
<link href="/widget/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"  type="text/css"/>
<link href="/widget/iconfont/iconfont.css" rel="stylesheet" />
 {cssjs}
<link href="/res/css/inside_page.css" rel="stylesheet"  type="text/css"/>
</head>

<body>
<div class="container-fluid larry-wrapper">
     <div class="row">
         <div class="col-xs-12 col-sm-12 col-md-12">
             <!--头部搜索-->
             <section class="panel panel-padding">
                    <form class="layui-form" method="post">
                        <div class="layui-form">
							<div class="layui-form-item">
								<div class="layui-input-inline" style="width:120px;">
								  <select name="quiz1" id="quiz1">
									<option value="">请选择类型</option>
									<option value="1" {xs1}>已收短信</option>
									<option value="2" {xs2}>已发短信</option>
								  </select>
								</div>
								<div class="layui-input-inline" style="width:120px;">
								  <select name="quiz2" id="quiz2">
									<option value="">请选择状态</option>
									<option value="1" {readY}>已读</option>
									<option value="2" {readN}>未读</option>
								  </select>
								</div>
								<div class="layui-input-inline">
                                  <input type="button" lay-submit class="layui-btn" lay-filter="search" id="btn_search" value="查找"/>
                                </div>
							  </div>    
                        </div>
                    </form>
            </section>

            <!--列表-->
                <section class="panel panel-padding">
                    <div class="group-button">
                        <button class="layui-btn layui-btn-small modal-iframe" id="btn_add">
                            <i class="iconfont">&#xe649;</i> 发送短信
                        </button>
						<button class="layui-btn layui-btn-small modal-iframe" id="btn_read">
                            <i class="iconfont">&#xe63f;</i> 标记为已读
                        </button>
                        <button class="layui-btn layui-btn-small layui-btn-danger ajax-all" id="btn_del">
                            <i class="iconfont">&#xe626;</i> 删除
                        </button>
                    </div>
                    <div class="layui-form">
                        <table id="example" class="layui-table lay-even">
                            <thead>
                                <tr>
                                    <th width="30"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check" lay-skin="primary"></th>
                                    <th width="60">序号</th>
									<th width="80">发送人</th>
									<th width="80">收信人</th>
                                    <th style="text-align:center;">内容</a></th>
									<th width="170" style="text-align:center;">发送时间</th>
                                    <th width="80" style="text-align:center;">状态</th>
                                    <th width="80" style="text-align:center;">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <!-- START list -->  
                                <tr>
                                    <td>
                                    <input type="checkbox" name="checkbox" lay-skin="primary" value="{id}"/>
                                    </td>
                                    <td>{id}</td>
                                    <td>{s_name}</td>
									<td>{a_name}</td>
                                    <td>{content}</td>
									<td>{time}</td>
									<td><par_read v1="{is_read}"></par_read></td>
                                    <td>
                                        <button class="layui-btn layui-btn-mini layui-btn-danger ajax" data-opt="del"  data-id="{id}">
                                            <i class="iconfont">&#xe626;</i>删除
                                        </button></td>
                                    </td>
                                </tr>
                                <!-- END list --> 
                            </tbody>
                        </table>
                    </div>
                </section>
				<div class="text-right" id="page" style="margin-top:-25px;">
					  <ul class="pagination pull-right">
                       {page}
					  </ul>
                </div>
         </div>
     </div>
</div>
<div id="tc" style="display:none;padding:10px;width:300px;height:200px;">
   {jsmodel}
   <script type="text/javascript">
        layui.use('news_sys');
         $("par_flg").each(function(a,b){
            if($(b).attr("v1")==0)
            {
                $(b).text("启用");
            }else{
                $(b).text("禁用");
            }
        });
		$("par_read").each(function(a,b){
            if($(b).attr("v1")==0)
            {
                $(b).text("未读");
            }else{
                $(b).text("已读");
            }
        });
        $().ready(function(){
           $("#btn_search").bind("click",function(){   
                var nm=$("#quiz1").val();
				var zt=$("#quiz2").val();
                location.href="?t=news_sys&quiz1="+nm+"&quiz2="+zt;
            }); 
        });
		
    </script>
</body>
</html>
